#ifndef TEXT_LABEL_H
#define TEXT_LABEL_H
#include "../core/node_affiliate.h"
class textLabel : public node_affiliate{
protected:
    TTF_Text* ttfText = nullptr;    
    char *path = "";
    int fontSize = 16;
    SDL_Color color = {0,0,0,255};
public:
    static textLabel* createTextLabel(screen* parent,const char* text_,char *path_, 
        int fontSize_,Anchor anchor = ANCHOR_CENTER);
    virtual void clean() override;
    void setPath(char *path_);
    void setFont(char *path_,int fontSize_);
    void setFontSize(int fontSize);
    void setColor(SDL_Color color_){ this->color = color_;};
    void setText(const char *text);
    char* getText(){ return path;};
    int getFontSize(){ return fontSize;};
    SDL_Color getColor(){ return color;};
    char* getTTFText(){ return ttfText->text;};
private:
    void updateSize();
    virtual void render() override;
};

#endif // TEXT_LABEL_H